package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SrSeatRecordMapper;
import com.ruoyi.system.domain.SrSeatRecord;
import com.ruoyi.system.service.ISrSeatRecordService;

/**
 * 座位-记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-04-04
 */
@Service
public class SrSeatRecordServiceImpl implements ISrSeatRecordService 
{
    @Autowired
    private SrSeatRecordMapper srSeatRecordMapper;

    /**
     * 查询座位-记录
     * 
     * @param id 座位-记录主键
     * @return 座位-记录
     */
    @Override
    public SrSeatRecord selectSrSeatRecordById(Long id)
    {
        return srSeatRecordMapper.selectSrSeatRecordById(id);
    }

    /**
     * 查询座位-记录列表
     * 
     * @param srSeatRecord 座位-记录
     * @return 座位-记录
     */
    @Override
    public List<SrSeatRecord> selectSrSeatRecordList(SrSeatRecord srSeatRecord)
    {
        return srSeatRecordMapper.selectSrSeatRecordList(srSeatRecord);
    }

    /**
     * 新增座位-记录
     * 
     * @param srSeatRecord 座位-记录
     * @return 结果
     */
    @Override
    public int insertSrSeatRecord(SrSeatRecord srSeatRecord)
    {
        srSeatRecord.setCreateTime(DateUtils.getNowDate());
        return srSeatRecordMapper.insertSrSeatRecord(srSeatRecord);
    }

    /**
     * 修改座位-记录
     * 
     * @param srSeatRecord 座位-记录
     * @return 结果
     */
    @Override
    public int updateSrSeatRecord(SrSeatRecord srSeatRecord)
    {
        srSeatRecord.setUpdateTime(DateUtils.getNowDate());
        return srSeatRecordMapper.updateSrSeatRecord(srSeatRecord);
    }

    /**
     * 批量删除座位-记录
     * 
     * @param ids 需要删除的座位-记录主键
     * @return 结果
     */
    @Override
    public int deleteSrSeatRecordByIds(Long[] ids)
    {
        return srSeatRecordMapper.deleteSrSeatRecordByIds(ids);
    }

    /**
     * 删除座位-记录信息
     * 
     * @param id 座位-记录主键
     * @return 结果
     */
    @Override
    public int deleteSrSeatRecordById(Long id)
    {
        return srSeatRecordMapper.deleteSrSeatRecordById(id);
    }
}
